<?php
namespace Apps\Back\Controllers;
use Phalcon\Mvc\Controller;

class ControllerAuth extends ControllerBase {

   protected $_operator=null;
   protected $_acl=array();

   function initialize(){
		if(!$this ->session ->has('operator')){
			$this->view->disable();
			$this->response->redirect('index/index');
			return;
		}
		$this->_operator=$this ->session ->get('operator');
		$this->_acl=explode(',',$this ->session ->get('operator')->acl);
		$this->view->setVar('_acl',$this->_acl);
		$this->view->setVar('_operator',$this->_operator);
   }
}
